// CRC32: ADB2F5D9 | Matched 2 variants of 1 shaders: Standard (Specular setup)
// 
//    Unity headers extracted from StandardSpecular.shader
//    Shader "Standard (Specular setup)" {
//      Properties {
//       _Color ("Color", Color) = (1,1,1,1)
//       _MainTex ("Albedo", 2D) = "white" { }
//       _Cutoff ("Alpha Cutoff", Range(0,1)) = 0.5
//       _Glossiness ("Smoothness", Range(0,1)) = 0.5
//       _SpecColor ("Specular", Color) = (0.2,0.2,0.2,1)
//       _SpecGlossMap ("Specular", 2D) = "white" { }
//       _BumpScale ("Scale", Float) = 1
//       _BumpMap ("Normal Map", 2D) = "bump" { }
//       _Parallax ("Height Scale", Range(0.005,0.08)) = 0.02
//       _ParallaxMap ("Height Map", 2D) = "black" { }
//       _OcclusionStrength ("Strength", Range(0,1)) = 1
//       _OcclusionMap ("Occlusion", 2D) = "white" { }
//       _EmissionColor ("Color", Color) = (0,0,0,1)
//       _EmissionMap ("Emission", 2D) = "white" { }
//       _DetailMask ("Detail Mask", 2D) = "white" { }
//       _DetailAlbedoMap ("Detail Albedo x2", 2D) = "grey" { }
//       _DetailNormalMapScale ("Scale", Float) = 1
//       _DetailNormalMap ("Normal Map", 2D) = "bump" { }
//      [Enum(UV0,0,UV1,1)]  _UVSec ("UV Set for secondary textures", Float) = 0
//      [HideInInspector]  _Mode ("__mode", Float) = 0
//      [HideInInspector]  _SrcBlend ("__src", Float) = 1
//      [HideInInspector]  _DstBlend ("__dst", Float) = 0
//      [HideInInspector]  _ZWrite ("__zw", Float) = 1
//      }
//      Fallback "VertexLit"
//      SubShader 1/2 {
//        LOD 300
//        Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
//        Pass 1/5 {
//          Name "FORWARD"
//          Tags { "LIGHTMODE"="ForwardBase" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
//          ZWrite [_ZWrite]
//          Blend [_SrcBlend] [_DstBlend]
//          GpuProgramID 36701
//          Program "vp" {
//            SubProgram "d3d9 " {
// 2:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "LIGHTMAP_OFF" "SHADOWS_SCREEN" "VERTEXLIGHT_ON" "_EMISSION" }
// 1:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "LIGHTMAP_OFF" "SHADOWS_SCREEN" "VERTEXLIGHT_ON" }
//              Bind "vertex" Vertex
//              Bind "normal" Normal
//              Bind "texcoord" TexCoord0
//              Bind "texcoord1" TexCoord1
//              Matrix 8 [_Object2World] 3
//              Matrix 11 [_World2Object] 3
//              Matrix 4 [glstate_matrix_mvp]
//              Vector 26 [_DetailAlbedoMap_ST]
//              Vector 25 [_MainTex_ST]
//              Vector 15 [_ProjectionParams]
//              Vector 16 [_ScreenParams]
//              Float 27 [_UVSec]
//              Vector 14 [_WorldSpaceCameraPos]
//              Vector 20 [unity_4LightAtten0]
//              Vector 17 [unity_4LightPosX0]
//              Vector 18 [unity_4LightPosY0]
//              Vector 19 [unity_4LightPosZ0]
//              Vector 0 [unity_LightColor0]
//              Vector 1 [unity_LightColor1]
//              Vector 2 [unity_LightColor2]
//              Vector 3 [unity_LightColor3]
//              Vector 23 [unity_SHBb]
//              Vector 22 [unity_SHBg]
//              Vector 21 [unity_SHBr]
//              Vector 24 [unity_SHC]
//            }
//          }
//        }
//      }
//    }
// 
// Headers extracted with DarkStarSword's extract_unity_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity_shaders.py

    vs_3_0
    def c28, 0.5, 0, 1, 0
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2
    dcl_texcoord1 v3
    dcl_position o0
    dcl_texcoord o1
    dcl_texcoord1 o2.xyz
    dcl_texcoord2 o3
    dcl_texcoord3 o4
    dcl_texcoord4 o5
    dcl_texcoord5 o6
    dcl_texcoord6 o7
    dcl_texcoord8 o8.xyz

def c220, 0, 1, 0.0625, 0.5
dcl_2d s0

texldl r6, c220.z, s0

// Unity reflection/specular fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --fix-unity-reflection --auto-fix-vertex-halo --add-fog-on-sm3-update --only-autofixed --ignore-register-errors Standard (Specular setup)/vp/ADB2F5D9.txt
mov r30, c14
mov r29, c220.x
mul r29.x, r6.x, -r6.y
dp4 r28.x, c180, r29
dp4 r28.y, c181, r29
dp4 r28.z, c182, r29
dp4 r28.w, c183, r29
dp4 r29.x, c190, r28
dp4 r29.y, c191, r28
dp4 r29.z, c192, r28
add r30.xyz, r30, -r29

    mad o1.xy, v2, c25, c25.zwzw
    abs r0.x, c27.x
    sge r0.x, -r0.x, r0.x
    mov r1.xy, v2
    lrp r2.xy, r0.x, r1, v3
    mad o1.zw, r2.xyxy, c26.xyxy, c26
    dp4 r0.x, c8, v0
    dp4 r0.y, c9, v0
    dp4 r0.z, c10, v0
    add o2.xyz, r0, -r30
    dp4 r1.y, c5, v0
    mul r0.w, r1.y, c15.x
    mul r2.w, r0.w, c28.x
    dp4 r1.x, c4, v0
    dp4 r1.w, c7, v0

mov o0, r1 // Relocated from line 151 with shadertool.py

// Automatic vertex shader halo fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --fix-unity-reflection --auto-fix-vertex-halo --add-fog-on-sm3-update --only-autofixed --ignore-register-errors Standard (Specular setup)/vp/ADB2F5D9.txt
texldl r31, c220.z, s0
add r31.w, r1.w, -r31.y
mad r1.x, r31.w, r31.x, r1.x

    mul r2.xz, r1.xyww, c28.x
    mad o7.xy, r2.z, c16.zwzw, r2.xwzw
    add r2, -r0.z, c19
    mov o8.xyz, r0
    add r3, -r0.x, c17
    add r0, -r0.y, c18
    mul r4.xyz, c12, v1.y
    mad r4.xyz, c11, v1.x, r4
    mad r4.xyz, c13, v1.z, r4
    nrm r5.xyz, r4
    mul r4, r0, r5.y
    mul r0, r0, r0
    mad r0, r3, r3, r0
    mad r3, r3, r5.x, r4
    mad r3, r2, r5.z, r3
    mad r0, r2, r2, r0
    rsq r2.x, r0.x
    rsq r2.y, r0.y
    rsq r2.z, r0.z
    rsq r2.w, r0.w
    mov r4.z, c28.z
    mad r0, r0, c20, r4.z
    mul r2, r2, r3
    max r2, r2, c28.y
    rcp r3.x, r0.x
    rcp r3.y, r0.y
    rcp r3.z, r0.z
    rcp r3.w, r0.w
    mul r0, r2, r3
    mul r2.xyz, r0.y, c1
    mad r2.xyz, c0, r0.x, r2
    mad r0.xyz, c2, r0.z, r2
    mad r0.xyz, c3, r0.w, r0
    mul r0.w, r5.y, r5.y
    mad r0.w, r5.x, r5.x, -r0.w
    mul r2, r5.yzzx, r5.xyzz
    mov o5.xyz, r5
    dp4 r3.x, c21, r2
    dp4 r3.y, c22, r2
    dp4 r3.z, c23, r2
    mad r2.xyz, c24, r0.w, r3
    add o6.xyz, r0, r2
    dp4 r1.z, c6, v0

//     mov o0, r1 // Relocated to line 108 with shadertool.py
mov o0.z, r1 // Inserted by shadertool.py

    mov o7.zw, r1
    mov o3, c28.y
    mov o4, c28.y
    mov o5.w, c28.y
    mov o6.w, c28.y
